import Vue from 'vue'
import Router from 'vue-router'
import MainLayout from './views/layout/MainLayout.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect:'/api/designer'
    },
    {
      path: '/about',
      name: 'about',
      component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    },
    {
      path: '/api',
      component: MainLayout,
      children:[
        {
          path:'designer',
          component: () => import('./Home.vue')
        }
      ]
    }
  ]
})
